package org.yuanqiframework.yuanqi.web.exception;

import lombok.Data;
import org.yuanqiframework.yuanqi.web.entity.ResponseCode;

@Data
public class BaseException extends RuntimeException {
    protected Integer errorCode;
    protected String errorMessage;

    public BaseException() {
        super();
        this.errorCode = ResponseCode.ERROR;
        this.errorMessage = "系统异常";
    }

    public BaseException(String message) {
        super(message);
        this.errorCode = ResponseCode.ERROR;
        this.errorMessage = message;
    }


    public BaseException(String message, Integer errorCode) {
        super(message);
        this.errorCode = errorCode;
        this.errorMessage = message;
    }


}
